package PTA3.ti23;

import java.util.Scanner;

/**
 * @author Lenovo
 */


class Goods {
    private String name;
    private double price;
    public Goods(String name, double price) {
        this.name = name;
        this.price = price;
    }
    @Override
    public String toString() {
        return name + "," + price;
    }
    public double getPrice() {
        return price;
    }
}

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Goods[] goods = new Goods[5];
        double total = 0.0;
        for (int i = 0; i < 5; i++) {
            String name = scanner.next();
            double price = scanner.nextDouble();
            goods[i] = new Goods(name, price);
            total += price;
        }
        for (Goods g : goods) {
            System.out.println(g);
        }
        System.out.printf("should pay:%.1f", total);
    }
}
